import JsEncrypt from 'jsencrypt'
const encrypt = {

    // rsa加密
    RSAEncrypt (strPassword) {
        let pubkey = 'MIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEA5uSHRBXy0koOpNbUC4zR/ZA6GDhyHyYBoiDnYIOjcOdRRXMDEb8Kd61mMj2dU5ptCv3JEL1GneCDLSslF7sSl+nGlmXPkfPSpwrGb+ZWxWzwn/7jcc5dKt8LIvuHqNPVH+4PDFgZ4akmE4itv2vaF2n9PhheQIsP+FH/ev5/EsEWWXJxkQUI8BFSU42rWSUKt+p5Yi8cu1IjjMfIMqKWfJ34d6yEI7qmeIybbIEcQdY1/koECPvhvUeFgm4PQRIVOpLRfpqbpuJSpK+E3BV2n2F755JFY/VZG6HutndYUfurn/QtykIyp1XD6nIBZYXXT8PYBhDbC6sCuq5fw8s1wQIDAQAB';
        let encrypt = new JsEncrypt();
        encrypt.setPublicKey(pubkey);
        let data = encrypt.encrypt(strPassword);
        return data;
    }
}

export default encrypt;
